import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/login'
import Register from '../views/register'
import Index from '../views/index'
import Home from '../views/home'
import My from '../views/my'
import Info from '../views/info'
import Public from '../views/public'
import MyPublic from '../views/myPublic.vue'
import MyLike from '../views/myLike.vue'
Vue.use(Router);

export default new Router({
	routes: [{
			path: '/',
			redirect: "/login",  //默认进入登陆页面
		},
		{
			path: '/login',
			component: Login
		}, {
			path: '/register',
			component: Register
		},
		{
			path: '/info',
			component: Info
		},
		{
			path: '/home',
			component: Home,
			children: [{
				path: '/index',
				component: Index
			}, {
				path: '/my',
				component: My
			}]
		},{
			path: '/public',
			component: Public
		},{
			path: '/myPublic',
			component: MyPublic
		},{
			path: '/myLike',
			component: MyLike
		},
	]
});